package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.ILoginActivityModel;
import com.wgts.wgts.mvp.model.imp.LoginActivityModel;
import com.wgts.wgts.mvp.presenter.ILoginActivityPersenter;
import com.wgts.wgts.mvp.presenter.imp.LoginActivityPersenter;
import com.wgts.wgts.mvp.view.ILoginActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.SharedpreferencesHelper;

import dagger.Module;
import dagger.Provides;

@Module
public class LoginActivityModule {

    private ILoginActivityView view;

    public LoginActivityModule(ILoginActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public ILoginActivityView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public ILoginActivityModel provideModel(NetService netService, SharedpreferencesHelper sharedpreferencesHelper){
        return new LoginActivityModel(netService, sharedpreferencesHelper);
    }

    @Provides
    @ActivityScope
    public ILoginActivityPersenter providePersenter(ILoginActivityModel model, ILoginActivityView view){
        return new LoginActivityPersenter(model, view);
    }


}
